<?php

declare(strict_types=1);

namespace App\Controller\Api;

use Hyperf\HttpServer\Contract\RequestInterface;
use App\Controller\AbstractController;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
use App\Service\ElasticSearchService\ElasticSearchModel\CommoditySearchService;

/**
 * @Controller(prefix="/es")
 * @author Administrator
 *
 */
class ElasticSearchController extends AbstractController
{
    /**
     * @RequestMapping(path="test",methods="get")
     * @param RequestInterface $request
     */
    public function index(RequestInterface $request)
    {
        return CommoditySearchService::instance()->getMapping();
    }
}